#!/bin/bash

echo "📊 构建结果检查"

echo "1. 已编译的对象文件:"
find .objs -name "*.o" | wc -l
echo "文件列表:"
ls .objs/*.o | xargs -n 5 basename -a

echo ""
echo "2. 检查关键文件是否编译:"
key_files=("stringhash.o" "depsearch.o" "cbp2make.o" "aicoder_enhancements.o")
for file in "${key_files[@]}"; do
    if [ -f ".objs/$file" ]; then
        echo "  ✅ $file"
    else
        echo "  ❌ $file"
    fi
done

echo ""
echo "3. 可执行文件信息:"
if [ -f "bin/cbp2make_ai" ]; then
    file bin/cbp2make_ai
    echo "大小: $(du -h bin/cbp2make_ai | cut -f1)"
else
    echo "可执行文件不存在"
fi
